var banner = document.querySelector('.container .imgarea a');
var curIndex = 0;
var timerId = null;
function startBanner() {
  if (timerId) {
    return;
  }
  timerId = setInterval(() => {
    curIndex++;
    if (curIndex >= data.length) {
      curIndex = 0;
    }
    var item = data[curIndex];
    banner.style.backgroundImage = `url(${item.img})`;
    banner.style.backgroundColor = item.bg;
  }, 2000);
}
